Subject: Re: Scrolling problems...
From: Mark Carter <[email-masked]>
To: [email-masked]
Date: Sun, 29 Sep 1996 19:07:31 +0000

Hi,

> > I've got a lowres 640x480 screen which I scroll in a 320x190 display, 
> > about 15 bobs including a ball, which the scrolling follows. All of 
> > this (including scrolling) was controlled by AMal proggies.
> > To begin with I was running the game at 25Hz using the following 
> > method:
> > [snip]
> > This however, is very jerky.  So I then decided to make the ball move 
> > at 50Hz by taking it out of the Amal bank and putting the new Amos 
> > code just BEFORE each Vbl.
> > 
> > This was even worse!  However, when I ran the program by freezing the 
> > scrolling amal program, all was ok.  I think the problem is that 
> > while EVERYTHING visible is updated in one smooth burst during the 
> > Bob Update command, the scrolling is done during the Synchro command. 
> > So, in effect, there are 2 changes to-the-eye every Vbl.
> 
> Probably the only way to get smooth scrolling and smooth ball movement is
> to use a sprite for the ball (so you can update it separately from the
> bobs) and maybe use Amal or an Every 1 Proc to control it.

Unfortunately, the ball needs to go behind bobs now and again.

Anyway, I've come up with an ok solution. It goes something like:

Synchro Off: Bob Update Off:Autoback 1
[Amos Code]
Wait Vbl:Synchro (this includes a scrolling channel)
bob clear
bob draw
wait vbl:screen swap

So this goes along at 25Hz, but now I dont get the jittery ball 
movement (you know like where the ball "appears" to jump back on 
itself)

Before, it was something like:

Synchro
wait vbl:Bob update
wait vbl

but I think the "Bob Update" command was not always completed  before 
the screen started to redraw again...

Hope this all makes sense!

Cheers,
        Mark

Mailto:[email-masked], [email-masked]
URL:   http://www.westmead.demon.co.uk/mark/index.htm